import java.util.Scanner;

public class Main {
    public static boolean is(char ch){
        if(Character.isDigit(ch)||Character.isLetter(ch))return true;
        return false;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        s=s.toLowerCase();
        int left=0,right=s.length()-1;
        while(left<right) {
            char leftChar = s.charAt(left);
            char rightChar = s.charAt(right);

        if(!is(leftChar)){
            left++;
            continue;
        }
        if(!is(rightChar)){
            right--;
            continue;
        }
        if(leftChar!=rightChar) {
            System.out.println(false);return;
        }
        left++;right--;
        }
        System.out.println(true);
    }
}
